The present invention relates to a method of protecting a heat exchanger against stresses caused by boiling of a heat exchange medium, a protection circuit of a steam boiler and a steam boiler provided with an apparatus for protecting a heat exchanger. The invention especially relates to protecting a heat exchanger without external control or external energy. Preferably, the method and the protection circuit of a heat exchanger in accordance with the present invention are used in situations where heat is recovered from a flue gas flow of thermal power boilers in conditions where there is a risk of, on one hand, condensing of corrosive substances on heat exchange surfaces and, on the other hand, boiling of the water used as a heat exchange medium.